<?php
class StaticController extends Zend_Controller_Action
{
        protected $_content;

        public function init() {
            $this->_content = new Application_Model_Content();
            $this->_helper->_block->add('mainVideo');
            $this->_helper->_block->add('tabs');
            $this->_helper->_block->add('socialWidget');
            $this->_helper->_block->add('popularNews');
            $this->_helper->_block->add('announcements');
            $this->_helper->_block->add('sites');
            $this->_helper->_block->add('otherSites');
        }

        public function indexAction() {
            $alias = $this->_getParam('name');                              
            $content = $this->_content->getPostByCategoryAlias($alias);
            if ($content) {
                $this->_content->visitContent($content['id']);
            }
            $this->view->content = $content;
        }
}